package cn.fanyamin.web.service;

import java.util.Collection;

import cn.fanyamin.dao.NewsDao;
import cn.fanyamin.domain.News;

public class NewsServiceImpl implements NewsService {
    private NewsDao newsDao;
    
    
    /**
     * @param newsDao the newsDao to set
     */
    public void setNewsDao(NewsDao newsDao) {
        this.newsDao = newsDao;
    }

    @Override
    public int count() {
        
        return newsDao.count();
    }

    @Override
    public Collection<News> list() {
        
        return newsDao.list();
    }

    @Override
    public Collection<News> list(int pageNum, int pageSize) {
        
        return newsDao.list(pageNum, pageSize);
    }

    @Override
    public Integer create(News t) {
        
        return newsDao.create(t);
    }

    @Override
    public News retrieve(Integer pk) {
        
        return newsDao.retrieve(pk);
    }

    @Override
    public void update(News t) {
        
        newsDao.update(t);
    }

    @Override
    public void delete(Integer pk) {
        newsDao.delete(pk);
        
    }

}
